package com.rran.study.designpattern.structural.composite;

import lombok.Data;

import java.math.BigDecimal;

/**
 * @author yy
 * @Type Good.java
 * @Desc
 * @date 2020/7/24 17:21
 */
@Data
public class Goods implements GoodsAction{

    private String name;

    private BigDecimal price;

    public Goods(String name, BigDecimal price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public void add(GoodsAction goods) {

    }

    @Override
    public void remove(GoodsAction goods) {

    }

    @Override
    public BigDecimal acount() {
        return price;
    }
}
